package com.oydsoft.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.oydsoft.auth.dto.S01;
import com.oydsoft.auth.dto.S03;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AuthMapper extends BaseMapper<S01> {

    @Select("select * from s01 where s0102=#{s0102}")
    S01 getInfoByUserName(String s0102);

    /*@Select("select * from s01 where s0102=#{s0102} and s0170=#{s0170}")
    S01 getInfoByUserName(String s0102,String s0170);*/

    @Select("select d.s0303 from s01 a inner join s011 b on a.S01_ID=b.S01_ID inner join s051 c on c.S05_ID=b.S05_ID inner join s03 d on d.S03_ID=c.S03_ID where a.s0102=#{s0102} group by s0303")
    List<S03> getUserPermissinList(String s0102);
}
